package com.driver.system.service.impl;

import com.driver.system.db.dao.MisWalletIncomeDao;
import com.driver.system.db.dao.MisWalletPaymentDao;
import com.driver.system.service.WalletIncomeService;
import com.driver.system.service.WalletPaymentService;
import com.driver.system.util.PageUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

@Service
@Slf4j
public class WalletPaymentServiceImpl implements WalletPaymentService {

    @Resource
    private MisWalletPaymentDao walletPaymentDao;


    @Override
    public PageUtils searchWalletPaymentByPage(Map param) {
        ArrayList<HashMap> list = walletPaymentDao.searchWalletPaymentByPage(param);
        long count = walletPaymentDao.searchWalletPaymentCount(param);
        int start = (Integer) param.get("start");
        int length = (Integer) param.get("length");
        return new PageUtils(list, count, start, length);
    }
}
